Skip to main content

nameChanged

Type

message

Summary

Sent to an object when its name is changed.

Syntax

nameChanged <pOldName>, <pNewName>

Description

Handle the nameChanged message if you want to make updates when an object's name is changed. For example, if you have a popup menu with the names of stacks, the menu should be updated when a stack's name changes.

The actual change is not triggered by the nameChanged message, so trapping the message and not allowing it to pass does not prevent the name from being changed.

Parameters

NameTypeDescription

pOldName

The object's original name.

pNewName

The object's new name.

Examples

on nameChanged myOldName,myNewName -- replace name in a menu button
put lineOffset(myOldName,button "Window List") into namePosition
put myNewName into line namePosition of button "Window List"
end nameChanged

control structure: pass

function: stacks

glossary: trap, message, popup menu, menu, object

message: IDChanged

object: stack

property: showName, groupNames, cardNames, name, number

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?